1. Field of the Invention
The present invention relates to a VLD (Variable Length Decoder) buffer management processing a bitstream for video decoding in a digital TV receiver, and more particularly, to a management apparatus and method of 32-bit double VLD buffers capable of reading a bitstream in a predetermined bit data unit length.
2. Background of the Related Art
In general, video data compression is a key technology in multimedia applications. Particularly, a VLC (Variable Length Coding) has been the most widely used data compression technique adapting data compression standards, such as JPEC (Joint Photographic Coding Experts Group), MPEG (Moving Picture Experts Group) and other image data compression standards. The VCL is used for decoding a variable length coded data.
For instance, the VLC is used for a station that broadcasts a digital television signal to compress video data, and the VLD (Variable Length Decoding) is used for a digital TV receiver to decode the variable length coded data. In other words, the data being received through the digital TV receiver is converted into a bitstream through channel demodulation. Among them a video bitstream is outputted to a video decoder, and an audio stream is outputted to an audio decoder. It is the video decoder that includes a variable length decoder.
The VLC reduces or limits the total number of bits by assigning more bits to rarely occurring values and less bits to frequently occurring values. During the variable length coding the data are assigned with different bits from each other according to data symbols.
Therefore, to decode the variable length coded data at the VLD of the digital TV receiver, it is necessary to find an appropriate code word for the data symbol.
To this end, the VLD should read a bitstream data by bit unit.
A VLD buffer is installed at the front end of the VLD. The VLD buffer reads an input bitstream by byte unit, and converts the data unit into a bit unit before outputting it to the VLD.
Traditionally an 8-bit VLD buffer was used to store an input bitstream by byte unit and output in bit unit.
Because a data to be processed was inputted from a bitstream by byte unit, the VLD buffer management was relatively easy. When processing the value of a bit, however, the overhead on the system was increased especially at a byte memory boundary. That is, if the 1-byte VLD buffer has no bitstream to be read by the VLD, data in the 1-byte VLD buffer are outputted to the VLD at first, and a new input bitstream is stored and outputted to the VLD, resultantly increasing the overhead.
FIG. 1 is a diagram illustrating a related art 1-byte VLD buffer system in which a bitstream is read by byte unit and outputted in bit unit. In the drawing, totbitoffset is a pointer to read an input bitstream in the VLD buffer by bit unit. The totbitoffset can be obtained by counting the bitstream by bit unit from the beginning.
To read a bitstream in byte unit through the 1-byte VLD buffer, a byte pointer, such as byteoffset in FIG. 1, is needed on the bitstream. The byteoffset is a byte pointer including the totbitoffset and obtained by dividing the totbitoffset value by 8. Also, bitoffset indicates a position of the totbitoffset in bit unit that is counted from the byte where the byteoffset is positioned. The bitoffset is obtained by dividing the totbitoffset value by 8 and corresponds to the bit length to be read on the byte. In other words, if the bitoffset value in FIG. 1 points ‘4’, it means that previous 4-bit data in the VLD buffer is already processed, and the remaining 4-bit data needs to be processed.
If the bit length the VLD is to read is greater than the bitoffset, an extra process is required. However, since the VLD buffer is in 8 bits, an access to the VLD buffer should be made every time for that extra process, which in turn deteriorates the processing speed. In addition, when handling a value in bits the overhead was increased at a byte memory boundary.